import React, {memo} from 'react';
import {Card,} from "antd";
import TimelineChart from "../Charts/TimelineChart";


const TimeLineChart = memo(
  ({chartData}) => {
    const data = chartData.map(item => (
      {
        x: item.client_log_time * 1e3,
        y1: item.speed,
      }
    ));
    return (
      <Card
        // loading={loading}
        bordered={false}
        style={{marginTop: 32}}
      >

        <div style={{padding: '0 24px'}}>
          <TimelineChart
            height={400}
            data={data}
            titleMap={{
              y1: '速度 (m/s)',
            }}
          />
        </div>
      </Card>
    )
  }
);


export default TimeLineChart;
